package com.lagou.service;

import com.github.pagehelper.PageInfo;
import com.lagou.domain.ResponseResult;
import com.lagou.domain.Role;
import com.lagou.domain.User;
import com.lagou.domain.UserVo;

import java.util.List;

public interface UserService {

    public PageInfo<User> findAllUserByPage(UserVo userVo);

    public User login(User user) throws Exception;

    public List<Role> findUserRelationRoleById(Integer id);

    /**
     * 用户关联角色
     * @param userVo
     */
    public void userContextRole(UserVo userVo);

    /**
     * 更新用户状态
     * @param user
     */
    public void updateUserStatus(User user);

    /**
     * 获取用户权限, 动态展示
     * @param userId
     * @return
     */
    public ResponseResult getUserPermissions(Integer userId);
}
